package thread;

class MyThread extends Thread{
    @Override
    public void run() {
        while(true) {
            System.out.println("Hello Thread");
        }
    }
}
public class Example {
    public static void main(String[] args) throws InterruptedException {
        MyThread t = new MyThread();
        t.start();
        while (true) {
            System.out.println("Hello main");
        }
    }
}
